//
//  NCItemCell.m
//  NC-Trendy
//
//  Created by LeungChaos on 16/2/24.
//  Copyright © 2016年 liang. All rights reserved.
//

#import "NCItemCell.h"

@interface NCItemCell ()
@property (weak, nonatomic) IBOutlet UIImageView *myImageView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;

@end

@implementation NCItemCell


+ (NCItemCell *)itemCellWithTableView:(UITableView *)tableView {
    static NSString *iden = @"itemCell";
    NCItemCell *cell = [[[NSBundle mainBundle]loadNibNamed:@"NCItemCell" owner:nil options:nil]lastObject];
    if (!cell) {
        cell = [tableView dequeueReusableCellWithIdentifier:iden];
    }
    return cell;
}

- (void)setNcItem:(NCItem *)ncItem {
    _ncItem = ncItem;
    [self.myImageView sd_setImageWithURL:[NSURL URLWithString:ncItem.item_image] placeholderImage:nil];
    self.titleLabel.text = ncItem.item_title;
    self.descLabel.text = ncItem.item_desc;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
